/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sim;

import java.awt.Point;

/**
 *
 * @author Administrator
 */
public class Square {
    protected  int int_x;
    protected  int int_y;
    protected  int radius;
    protected int int_color;
    public Square(int x, int y, int radius, int int_color) {
        this.int_x = x;
        this.int_y = y;
        this.radius = radius;
        this.int_color = int_color;
    }

    public boolean contains(int x, int y, int color) {

        boolean isContain = false;
        if ((x >= int_x) && (x <= (int_x + radius)) && (y >= int_y) && (y <= (int_y + radius)) && (int_color == color)) {
            isContain = true;
        }
        System.out.println("int_x = " + int_x + ", int_y = " + int_y + ", int_color = " + int_color);
        System.out.println("x = " + x + ", y = " + y + ", color = " + color);
        return isContain;
        
    }
}
